package com.app.hmst.main;

import android.os.Bundle;
import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.util.Base64;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;

public class ShowImageActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		System.gc();
        this.requestWindowFeature(Window.FEATURE_NO_TITLE);
        //Remove notification bar
        this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        
		setContentView(R.layout.activity_show_image);
		ImageView imv = (ImageView) findViewById(R.id.full_image_view);
		String base64 = getIntent().getStringExtra("imgBase64");
		byte[] decodedString = Base64.decode(base64, Base64.DEFAULT);
		
		Bitmap bitmap = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);
		imv.setImageBitmap(bitmap);
	}
	@Override
	public void onBackPressed(){
		this.finish();
	}

}
